
USE [RD_SalesMart]
GO


/****** Object:  Index [PK_FBCCustomerMasterCommissioninfo]    Script Date: 5/29/13 1:03:46 PM ******/
ALTER TABLE [dbo].[FBCCustomerMasterCommissioninfo] ADD  CONSTRAINT [PK_FBCCustomerMasterCommissioninfo] PRIMARY KEY CLUSTERED 
(
	[AddressNumber] ASC,
	[CompanyNumber] ASC,
	[CommissionLineNumber] ASC,
	[Salesperson1] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80, DATA_COMPRESSION = PAGE) ON [PRIMARY]
GO




/****** Object:  Index [PK_Sales_Star_Facts]    Script Date: 11/11/2011 11:17:02 ******/
ALTER TABLE [dbo].[Sales_Star_Facts] ADD  CONSTRAINT [PK_Sales_Star_Facts] PRIMARY KEY CLUSTERED 
(
	[OrderNumberDocumentCompany] ASC,
	[OrderNumber] ASC,
	[OrderTypeCode] ASC,
	[LineNumber] ASC,
	[OrderSuffix] ASC,
	[TransactionType] ASC,
	[ItemNumber] ASC,
	[BusinessUnitCode] ASC,
	[RequestedDateID] ASC,
	[AddressNumber] ASC,
	[ForecastType] ASC,
	[YearCalendarYear] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_ORDERSuffix]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_ORDERSuffix] ON [dbo].[Sales_Star_Facts] 
(
	[OrderSuffix] ASC,
	[OrderTypeCode] ASC
)
INCLUDE ( [SourceID],
[OrderNumber]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_UOMPrimary]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_UOMPrimary] ON [dbo].[Sales_Star_Facts] 
(
	[UnitOfMeasurePrimary] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_TypeID]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_TypeID] ON [dbo].[Sales_Star_Facts] 
(
	[TypeID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_TranTypeID]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_TranTypeID] ON [dbo].[Sales_Star_Facts] 
(
	[TransactionTypeID] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_TransactionDate]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_TransactionDate] ON [dbo].[Sales_Star_Facts] 
(
	[TransactionDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_ShipToNumber]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_ShipToNumber] ON [dbo].[Sales_Star_Facts] 
(
	[ShiptoNumber] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_ShipDate]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_ShipDate] ON [dbo].[Sales_Star_Facts] 
(
	[ShipDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_SalesRepID]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_SalesRepID] ON [dbo].[Sales_Star_Facts] 
(
	[SalesRepID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_RequestedDate]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_RequestedDate] ON [dbo].[Sales_Star_Facts] 
(
	[RequestedDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_PromisedDelDate]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_PromisedDelDate] ON [dbo].[Sales_Star_Facts] 
(
	[PromisedDeliveryDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_PriceID]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_PriceID] ON [dbo].[Sales_Star_Facts] 
(
	[PriceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_PriceEffectiveDate]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_PriceEffectiveDate] ON [dbo].[Sales_Star_Facts] 
(
	[PriceEffectiveDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_ParentNumber]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_ParentNumber] ON [dbo].[Sales_Star_Facts] 
(
	[ParentNumber] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_OriginalPromisedDate]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_OriginalPromisedDate] ON [dbo].[Sales_Star_Facts] 
(
	[OriginalPromisedDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_OrderTypeCode]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_OrderTypeCode] ON [dbo].[Sales_Star_Facts] 
(
	[OrderTypeCode] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_ItemNumberID]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_ItemNumberID] ON [dbo].[Sales_Star_Facts] 
(
	[ItemNumberID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_ItemNum_UOMPrimary]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_ItemNum_UOMPrimary] ON [dbo].[Sales_Star_Facts] 
(
	[ItemNumber] ASC,
	[UnitOfMeasurePrimary] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_ItemNum_UOMAsInput]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_ItemNum_UOMAsInput] ON [dbo].[Sales_Star_Facts] 
(
	[ItemNumber] ASC,
	[UnitOfMeasureAsInput] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_InvoiceDate]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_InvoiceDate] ON [dbo].[Sales_Star_Facts] 
(
	[InvoiceDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_GLDate]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_GLDate] ON [dbo].[Sales_Star_Facts] 
(
	[GLDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_FactsHdrID]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_FactsHdrID] ON [dbo].[Sales_Star_Facts] 
(
	[FactsHdrID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_FactsExtID]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_FactsExtID] ON [dbo].[Sales_Star_Facts] 
(
	[FactsExtID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_CostID]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_CostID] ON [dbo].[Sales_Star_Facts] 
(
	[CostID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_CompanyID]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_CompanyID] ON [dbo].[Sales_Star_Facts] 
(
	[CompanyNumberID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_CancelDateID]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_CancelDateID] ON [dbo].[Sales_Star_Facts] 
(
	[CancelDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_BusinessUnitID]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_BusinessUnitID] ON [dbo].[Sales_Star_Facts] 
(
	[BusinessUnitID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_AddressNumber]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_AddressNumber] ON [dbo].[Sales_Star_Facts] 
(
	[AddressNumber] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_ActualDeliveryDate]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_ActualDeliveryDate] ON [dbo].[Sales_Star_Facts] 
(
	[ActualDeliveryDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_AddressNumber_BusinessUnit]    Script Date: 11/11/2011 11:17:02 ******/
CREATE NONCLUSTERED INDEX [IX_AddressNumber_BusinessUnit] ON [dbo].[Sales_Star_Facts] 
(
	[AddressNumber] ASC,
	[BusinessUnitCode] ASC,
	[FactsExtID] ASC,
	[ForecastType] ASC,
	[LineNumber] ASC,
	[ItemNumber] ASC,
	[OrderNumber] ASC,
	[OrderNumberDocumentCompany] ASC,
	[OrderSuffix] ASC,
	[OrderTypeCode] ASC,
	[TransactionType] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO


USE [RD_SalesMart]
GO

/****** Object:  Index [PK_JDESOSalesOrderDetail]    Script Date: 11/11/2011 11:17:18 ******/
ALTER TABLE [dbo].[Sales_Star_FactsExt] ADD  CONSTRAINT [PK_JDESOSalesOrderDetail] PRIMARY KEY CLUSTERED 
(
	[OrderNumber] ASC,
	[OrderNumberDocumentCompany] ASC,
	[LineNumber] ASC,
	[OrderTypeCode] ASC,
	[OrderSuffix] ASC,
	[TransactionType] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsExt_UserReservedDate]    Script Date: 11/11/2011 11:17:18 ******/
CREATE NONCLUSTERED INDEX [IX_FactsExt_UserReservedDate] ON [dbo].[Sales_Star_FactsExt] 
(
	[UserReservedDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsExt_PaymentTermsID]    Script Date: 11/11/2011 11:17:18 ******/
CREATE NONCLUSTERED INDEX [IX_FactsExt_PaymentTermsID] ON [dbo].[Sales_Star_FactsExt] 
(
	[PaymentTermsID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsExt_FactsExtID]    Script Date: 11/11/2011 11:17:18 ******/
CREATE NONCLUSTERED INDEX [IX_FactsExt_FactsExtID] ON [dbo].[Sales_Star_FactsExt] 
(
	[FactsExtID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsExt_DateRelease]    Script Date: 11/11/2011 11:17:18 ******/
CREATE NONCLUSTERED INDEX [IX_FactsExt_DateRelease] ON [dbo].[Sales_Star_FactsExt] 
(
	[DateReleaseID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

USE [RD_SalesMart]
GO

/****** Object:  Index [PK_Sales_Star_FactsHdr]    Script Date: 11/11/2011 11:17:33 ******/
ALTER TABLE [dbo].[Sales_Star_FactsHdr] ADD  CONSTRAINT [PK_Sales_Star_FactsHdr] PRIMARY KEY CLUSTERED 
(
	[OrderNumber] ASC,
	[OrderTypeCode] ASC,
	[OrderNumberDocumentCompany] ASC,
	[OrderSuffix] ASC,
	[TransactionType] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsHdr_UserReservedDate]    Script Date: 11/11/2011 11:17:33 ******/
CREATE NONCLUSTERED INDEX [IX_FactsHdr_UserReservedDate] ON [dbo].[Sales_Star_FactsHdr] 
(
	[UserReservedDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsHdr_ShipDate]    Script Date: 11/11/2011 11:17:33 ******/
CREATE NONCLUSTERED INDEX [IX_FactsHdr_ShipDate] ON [dbo].[Sales_Star_FactsHdr] 
(
	[ShipDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsHdr_RequestedDate]    Script Date: 11/11/2011 11:17:33 ******/
CREATE NONCLUSTERED INDEX [IX_FactsHdr_RequestedDate] ON [dbo].[Sales_Star_FactsHdr] 
(
	[RequestedDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsHdr_PromisedDelDate]    Script Date: 11/11/2011 11:17:33 ******/
CREATE NONCLUSTERED INDEX [IX_FactsHdr_PromisedDelDate] ON [dbo].[Sales_Star_FactsHdr] 
(
	[PromisedDeliveryDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsHdr_PriceEffDate]    Script Date: 11/11/2011 11:17:33 ******/
CREATE NONCLUSTERED INDEX [IX_FactsHdr_PriceEffDate] ON [dbo].[Sales_Star_FactsHdr] 
(
	[PriceEffectiveDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsHdr_PaymentTermsID]    Script Date: 11/11/2011 11:17:33 ******/
CREATE NONCLUSTERED INDEX [IX_FactsHdr_PaymentTermsID] ON [dbo].[Sales_Star_FactsHdr] 
(
	[PaymentTermsID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsHdr_OriginalPromDate]    Script Date: 11/11/2011 11:17:33 ******/
CREATE NONCLUSTERED INDEX [IX_FactsHdr_OriginalPromDate] ON [dbo].[Sales_Star_FactsHdr] 
(
	[OriginalPromisedDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsHdr_OPLatestLineDate]    Script Date: 11/11/2011 11:17:33 ******/
CREATE NONCLUSTERED INDEX [IX_FactsHdr_OPLatestLineDate] ON [dbo].[Sales_Star_FactsHdr] 
(
	[OPLatestLineDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsHdr_FutureUseDate]    Script Date: 11/11/2011 11:17:33 ******/
CREATE NONCLUSTERED INDEX [IX_FactsHdr_FutureUseDate] ON [dbo].[Sales_Star_FactsHdr] 
(
	[FutureUseDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsHdr_FactsHdrID]    Script Date: 11/11/2011 11:17:33 ******/
CREATE NONCLUSTERED INDEX [IX_FactsHdr_FactsHdrID] ON [dbo].[Sales_Star_FactsHdr] 
(
	[FactsHdrID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsHdr_DateReqShip]    Script Date: 11/11/2011 11:17:33 ******/
CREATE NONCLUSTERED INDEX [IX_FactsHdr_DateReqShip] ON [dbo].[Sales_Star_FactsHdr] 
(
	[DateRequestedShipID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsHdr_DateActDel]    Script Date: 11/11/2011 11:17:33 ******/
CREATE NONCLUSTERED INDEX [IX_FactsHdr_DateActDel] ON [dbo].[Sales_Star_FactsHdr] 
(
	[DateActualDeliveryID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsHdr_CancelDate]    Script Date: 11/11/2011 11:17:33 ******/
CREATE NONCLUSTERED INDEX [IX_FactsHdr_CancelDate] ON [dbo].[Sales_Star_FactsHdr] 
(
	[CancelDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsHdr_ActualDelDate]    Script Date: 11/11/2011 11:17:33 ******/
CREATE NONCLUSTERED INDEX [IX_FactsHdr_ActualDelDate] ON [dbo].[Sales_Star_FactsHdr] 
(
	[ActualDeliveryDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_TransactionDate]    Script Date: 11/11/2011 11:17:33 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_TransactionDate] ON [dbo].[Sales_Star_FactsHdr] 
(
	[TransactionDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

USE [RD_SalesMart]
GO

/****** Object:  Index [PK_Sales_Star_FactsRebates]    Script Date: 11/11/2011 11:18:00 ******/
ALTER TABLE [dbo].[Sales_Star_FactsRebates] ADD  CONSTRAINT [PK_Sales_Star_FactsRebates] PRIMARY KEY CLUSTERED 
(
	[OrderNumber] ASC,
	[OrderNumberDocumentCompany] ASC,
	[LineNumber] ASC,
	[OrderTypeCode] ASC,
	[OrderSuffix] ASC,
	[TransactionType] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsRebates_FactsExtID]    Script Date: 11/11/2011 11:18:00 ******/
CREATE NONCLUSTERED INDEX [IX_FactsRebates_FactsExtID] ON [dbo].[Sales_Star_FactsRebates] 
(
	[FactsExtID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

USE [RD_SalesMart]
GO

/****** Object:  Index [PK_Sales_Star_PriceLedger]    Script Date: 11/11/2011 11:18:17 ******/
ALTER TABLE [dbo].[Sales_Star_PriceLedger] ADD  CONSTRAINT [PK_Sales_Star_PriceLedger] PRIMARY KEY CLUSTERED 
(
	[OrderNumber] ASC,
	[OrderTypeCode] ASC,
	[OrderNumberDocumentCompany] ASC,
	[LineNumber] ASC,
	[SequenceNumber] ASC,
	[OrderSuffix] ASC,
	[PriceHistoryAlternateKey] ASC,
	[PriceHistoryAlternateKeySource] ASC,
	[SubSequenceNumber] ASC,
	[Tier] ASC,
	[TargetApplication] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_SequenceNumber]    Script Date: 11/11/2011 11:18:17 ******/
CREATE NONCLUSTERED INDEX [IX_SequenceNumber] ON [dbo].[Sales_Star_PriceLedger] 
(
	[SequenceNumber] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_OrderNumberTypeLineNumber]    Script Date: 11/11/2011 11:18:17 ******/
CREATE NONCLUSTERED INDEX [IX_OrderNumberTypeLineNumber] ON [dbo].[Sales_Star_PriceLedger] 
(
	[SourceID] ASC,
	[OrderNumber] ASC,
	[OrderTypeCode] ASC,
	[OrderNumberDocumentCompany] ASC,
	[LineNumber] ASC,
	[UnitOfMeasureAsInput] ASC,
	[PriceAdjustmentKeyID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Adjustmentname]    Script Date: 11/11/2011 11:18:17 ******/
CREATE NONCLUSTERED INDEX [IX_Adjustmentname] ON [dbo].[Sales_Star_PriceLedger] 
(
	[AdjustmentName] ASC,
	[UnitOfMeasureAsInput] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

USE [RD_SalesMart]
GO

/****** Object:  Index [PK_Sales_Star_SalesRep]    Script Date: 11/11/2011 11:18:29 ******/
ALTER TABLE [dbo].[Sales_Star_SalesRep] ADD  CONSTRAINT [PK_Sales_Star_SalesRep] PRIMARY KEY CLUSTERED 
(
	[SalesRepNumber] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_SalesRep_SalesRepID]    Script Date: 11/11/2011 11:18:29 ******/
CREATE NONCLUSTERED INDEX [IX_SalesRep_SalesRepID] ON [dbo].[Sales_Star_SalesRep] 
(
	[SalesRepID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

USE [RD_SalesMart]
GO

/****** Object:  Index [PK_FBCCustomerMasterCommissioninfo]    Script Date: 11/11/2011 11:23:37 ******/
ALTER TABLE [dbo].[FBCCustomerMasterCommissioninfo] ADD  CONSTRAINT [PK_FBCCustomerMasterCommissioninfo] PRIMARY KEY CLUSTERED 
(
	[AddressNumber] ASC,
	[CompanyNumber] ASC,
	[CommissionLineNumber] ASC,
	[Salesperson1] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_378]    Script Date: 11/11/2011 11:23:37 ******/
CREATE NONCLUSTERED INDEX [missing_index_378] ON [dbo].[FBCCustomerMasterCommissioninfo] 
(
	[Role] ASC
)
INCLUDE ( [AddressNumber],
[Salesperson1]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_376]    Script Date: 11/11/2011 11:23:37 ******/
CREATE NONCLUSTERED INDEX [missing_index_376] ON [dbo].[FBCCustomerMasterCommissioninfo] 
(
	[Role] ASC
)
INCLUDE ( [Salesperson1]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

USE [RD_SalesMart]
GO

/****** Object:  Index [NET SALES BY  Levels-FOR AOP PURPOSES_DTA_K37_K56_K25_K6_K1_K5_K24_K15_K17_K12_45_53_55]    Script Date: 5/29/13 1:04:39 PM ******/
CREATE NONCLUSTERED INDEX [NET SALES BY  Levels-FOR AOP PURPOSES_DTA_K37_K56_K25_K6_K1_K5_K24_K15_K17_K12_45_53_55] ON [dbo].[Sales_Star_Facts]
(
	[GLDateID] ASC,
	[UnitOfMeasureAsInput] ASC,
	[ItemNumber] ASC,
	[ItemNumberID] ASC,
	[FactsExtID] ASC,
	[CustomerNumberID] ASC,
	[ShiptoNumber] ASC,
	[OrderNumber] ASC,
	[LineNumber] ASC,
	[SourceID] ASC
)
INCLUDE ( 	[QuantityShipped],
	[ExtendedPrice],
	[ExtendedCost]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO

/****** Object:  Index [NET SALES BY  Levels-FOR AOP PURPOSES_DTA_K56_K25_K37]    Script Date: 5/29/13 1:04:39 PM ******/
CREATE NONCLUSTERED INDEX [NET SALES BY  Levels-FOR AOP PURPOSES_DTA_K56_K25_K37] ON [dbo].[Sales_Star_Facts]
(
	[UnitOfMeasureAsInput] ASC,
	[ItemNumber] ASC,
	[GLDateID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO

/****** Object:  Index [NET SALES BY  Levels-FOR AOP PURPOSES_DTA_K56_K25_K5]    Script Date: 5/29/13 1:04:39 PM ******/
CREATE NONCLUSTERED INDEX [NET SALES BY  Levels-FOR AOP PURPOSES_DTA_K56_K25_K5] ON [dbo].[Sales_Star_Facts]
(
	[UnitOfMeasureAsInput] ASC,
	[ItemNumber] ASC,
	[CustomerNumberID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO

/****** Object:  Index [NET SALES BY CUSTOMER-Foodservice MARGIN_041912_DTA]    Script Date: 5/29/13 1:04:39 PM ******/
CREATE NONCLUSTERED INDEX [NET SALES BY CUSTOMER-Foodservice MARGIN_041912_DTA] ON [dbo].[Sales_Star_Facts]
(
	[GLDateID] ASC,
	[UnitOfMeasureAsInput] ASC,
	[TransactionType] ASC,
	[OrderSuffix] ASC,
	[ItemNumber] ASC,
	[SourceID] ASC,
	[YearCalendarYear] ASC,
	[ForecastType] ASC,
	[OrderNumber] ASC,
	[AddressNumber] ASC,
	[LineNumber] ASC,
	[OrderNumberDocumentCompany] ASC,
	[RequestedDateID] ASC,
	[BusinessUnitCode] ASC,
	[OrderTypeCode] ASC,
	[ItemNumberID] ASC
)
INCLUDE ( 	[FactsExtID],
	[CustomerNumberID],
	[ShiptoNumber],
	[InvoiceDateID],
	[QuantityShipped],
	[ExtendedPrice],
	[ExtendedCost]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO

/****** Object:  Index [R&G EX Price and LBS-Foodservice_DTA_041912_K56_K25]    Script Date: 5/29/13 1:04:39 PM ******/
CREATE NONCLUSTERED INDEX [R&G EX Price and LBS-Foodservice_DTA_041912_K56_K25] ON [dbo].[Sales_Star_Facts]
(
	[UnitOfMeasureAsInput] ASC,
	[ItemNumber] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO


USE [RD_SalesMart]
GO

/****** Object:  Index [PK_Sales_Star_Facts]    Script Date: 5/29/13 1:06:13 PM ******/
ALTER TABLE [dbo].[Sales_Star_Facts] ADD  CONSTRAINT [PK_Sales_Star_Facts] PRIMARY KEY CLUSTERED 
(
	[OrderNumberDocumentCompany] ASC,
	[OrderNumber] ASC,
	[OrderTypeCode] ASC,
	[LineNumber] ASC,
	[OrderSuffix] ASC,
	[TransactionType] ASC,
	[ItemNumber] ASC,
	[BusinessUnitCode] ASC,
	[RequestedDateID] ASC,
	[AddressNumber] ASC,
	[ForecastType] ASC,
	[YearCalendarYear] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90, DATA_COMPRESSION = PAGE) ON [PRIMARY]
GO

/****** Object:  Index [IX_AddressNumber_BusinessUnit]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_AddressNumber_BusinessUnit] ON [dbo].[Sales_Star_Facts]
(
	[AddressNumber] ASC,
	[BusinessUnitCode] ASC,
	[FactsExtID] ASC,
	[ForecastType] ASC,
	[LineNumber] ASC,
	[ItemNumber] ASC,
	[OrderNumber] ASC,
	[OrderNumberDocumentCompany] ASC,
	[OrderSuffix] ASC,
	[OrderTypeCode] ASC,
	[TransactionType] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_ActualDeliveryDate]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_ActualDeliveryDate] ON [dbo].[Sales_Star_Facts]
(
	[ActualDeliveryDateID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_AddressNumber]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_AddressNumber] ON [dbo].[Sales_Star_Facts]
(
	[AddressNumber] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_BusinessUnitID]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_BusinessUnitID] ON [dbo].[Sales_Star_Facts]
(
	[BusinessUnitID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_CancelDateID]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_CancelDateID] ON [dbo].[Sales_Star_Facts]
(
	[CancelDateID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_CompanyID]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_CompanyID] ON [dbo].[Sales_Star_Facts]
(
	[CompanyNumberID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_CostID]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_CostID] ON [dbo].[Sales_Star_Facts]
(
	[CostID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_FactsExtID]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_FactsExtID] ON [dbo].[Sales_Star_Facts]
(
	[FactsExtID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_FactsHdrID]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_FactsHdrID] ON [dbo].[Sales_Star_Facts]
(
	[FactsHdrID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_GLDate]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_GLDate] ON [dbo].[Sales_Star_Facts]
(
	[GLDateID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_InvoiceDate]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_InvoiceDate] ON [dbo].[Sales_Star_Facts]
(
	[InvoiceDateID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_ItemNum_UOMAsInput]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_ItemNum_UOMAsInput] ON [dbo].[Sales_Star_Facts]
(
	[ItemNumber] ASC,
	[UnitOfMeasureAsInput] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_ItemNum_UOMPrimary]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_ItemNum_UOMPrimary] ON [dbo].[Sales_Star_Facts]
(
	[ItemNumber] ASC,
	[UnitOfMeasurePrimary] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_ItemNumberID]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_ItemNumberID] ON [dbo].[Sales_Star_Facts]
(
	[ItemNumberID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_OrderTypeCode]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_OrderTypeCode] ON [dbo].[Sales_Star_Facts]
(
	[OrderTypeCode] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_OriginalPromisedDate]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_OriginalPromisedDate] ON [dbo].[Sales_Star_Facts]
(
	[OriginalPromisedDateID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_ParentNumber]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_ParentNumber] ON [dbo].[Sales_Star_Facts]
(
	[ParentNumber] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_PriceEffectiveDate]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_PriceEffectiveDate] ON [dbo].[Sales_Star_Facts]
(
	[PriceEffectiveDateID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_PriceID]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_PriceID] ON [dbo].[Sales_Star_Facts]
(
	[PriceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_PromisedDelDate]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_PromisedDelDate] ON [dbo].[Sales_Star_Facts]
(
	[PromisedDeliveryDateID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_RequestedDate]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_RequestedDate] ON [dbo].[Sales_Star_Facts]
(
	[RequestedDateID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_SalesRepID]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_SalesRepID] ON [dbo].[Sales_Star_Facts]
(
	[SalesRepID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_ShipDate]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_ShipDate] ON [dbo].[Sales_Star_Facts]
(
	[ShipDateID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_ShipToNumber]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_ShipToNumber] ON [dbo].[Sales_Star_Facts]
(
	[ShiptoNumber] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_TransactionDate]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_TransactionDate] ON [dbo].[Sales_Star_Facts]
(
	[TransactionDateID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_TranTypeID]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_TranTypeID] ON [dbo].[Sales_Star_Facts]
(
	[TransactionTypeID] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_TypeID]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_TypeID] ON [dbo].[Sales_Star_Facts]
(
	[TypeID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_UOMPrimary]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_Facts_UOMPrimary] ON [dbo].[Sales_Star_Facts]
(
	[UnitOfMeasurePrimary] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO

/****** Object:  Index [IX_index_Sales_Star_Facts_2_ychoi_040312]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_index_Sales_Star_Facts_2_ychoi_040312] ON [dbo].[Sales_Star_Facts]
(
	[UnitOfMeasureAsInput] ASC,
	[ItemNumber] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_index_Sales_Star_Facts_ychoi_040312]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_index_Sales_Star_Facts_ychoi_040312] ON [dbo].[Sales_Star_Facts]
(
	[GLDateID] ASC,
	[CustomerNumberID] ASC,
	[ItemNumber] ASC,
	[UnitOfMeasureAsInput] ASC,
	[SourceID] ASC
)
INCLUDE ( 	[ExtendedPrice],
	[ExtendedCost]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_ORDERSuffix]    Script Date: 5/29/13 1:06:14 PM ******/
CREATE NONCLUSTERED INDEX [IX_ORDERSuffix] ON [dbo].[Sales_Star_Facts]
(
	[OrderSuffix] ASC,
	[OrderTypeCode] ASC
)
INCLUDE ( 	[SourceID],
	[OrderNumber]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO





USE [RD_SalesMart]
GO

/****** Object:  Index [R&G EX Price and LBS-Foodservice_DTA_041912_K10_K7_K1]    Script Date: 5/29/13 1:07:52 PM ******/
CREATE NONCLUSTERED INDEX [R&G EX Price and LBS-Foodservice_DTA_041912_K10_K7_K1] ON [dbo].[Sales_Star_FactsExt]
(
	[TransactionType] ASC,
	[OrderTypeCode] ASC,
	[FactsExtID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO

USE [RD_SalesMart]
GO

/****** Object:  Index [PK_Sales_Star_PriceAdjustment]    Script Date: 5/29/13 1:08:41 PM ******/
ALTER TABLE [dbo].[Sales_Star_PriceAdjustment] ADD  CONSTRAINT [PK_Sales_Star_PriceAdjustment] PRIMARY KEY CLUSTERED 
(
	[AdjustmentName] ASC,
	[ItemNumber] ASC,
	[AddressNumber] ASC,
	[CurrencyCode] ASC,
	[UnitOfMeasureAsInput] ASC,
	[QuantityFrom] ASC,
	[ExpiredDate] ASC,
	[DateUpdated] ASC,
	[TimeOfDay] ASC,
	[ItemGroupKeyID] ASC,
	[CustomerGroupKeyID] ASC,
	[OrderGroupKeyID] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80, DATA_COMPRESSION = PAGE) ON [PRIMARY]
GO

USE [RD_SalesMart]
GO

/****** Object:  Index [NET SALES BY  Levels-FOR AOP PURPOSES_DTA_K7_K37_K38_K39_K40_K41_K71_K5_K3_K4_K6_1_33]    Script Date: 5/29/13 1:09:05 PM ******/
CREATE NONCLUSTERED INDEX [NET SALES BY  Levels-FOR AOP PURPOSES_DTA_K7_K37_K38_K39_K40_K41_K71_K5_K3_K4_K6_1_33] ON [dbo].[Sales_Star_PriceLedger]
(
	[SequenceNumber] ASC,
	[OrderSuffix] ASC,
	[PriceHistoryAlternateKey] ASC,
	[PriceHistoryAlternateKeySource] ASC,
	[SubSequenceNumber] ASC,
	[Tier] ASC,
	[TargetApplication] ASC,
	[OrderNumberDocumentCompany] ASC,
	[OrderNumber] ASC,
	[OrderTypeCode] ASC,
	[LineNumber] ASC
)
INCLUDE ( 	[SourceID],
	[PriceAdjustmentKeyID]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO

